﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using web_mvcv2.Models;

namespace web_mvcv2.Controllers
{
	[HandleError]
	public class HomeController : Controller
	{
		public ActionResult Index()
		{
			Person loPerson = new Person();
			List<Person> laPeople = new List<Person>();

			loPerson.ID = 1;
			loPerson.FirstName = "pert1";
			loPerson.LastName = "tedd1";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 2;
			loPerson.FirstName = "pert1";
			loPerson.LastName = "tedd1";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 3;
			loPerson.FirstName = "pert3";
			loPerson.LastName = "tedd3";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 4;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);
			loPerson = new Person();
			loPerson.ID = 5;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 6;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 7;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 8;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 9;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 10;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 11;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 12;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 13;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 5;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 6;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 7;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 8;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 9;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 10;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 11;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 12;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 13;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			loPerson = new Person();
			loPerson.ID = 14;
			loPerson.FirstName = "pert4";
			loPerson.LastName = "tedd5";
			laPeople.Add(loPerson);

			var data = laPeople;
			return View(data);

		}

		public ActionResult About()
		{
			return View();
		}
	}
}
